package com.jiyinit.web.core.activiti.enums.evection;

/**
 * Created by user1 on 2018/12/26.
 */
public enum EveTaskGatewayEnum {
    Task1Gateway1("usertask1","gateway1"),
    Task1Gateway2("usertask2","gateway2"),
    Task1Gateway3("usertask3","gateway3"),
    Task1Gateway4("usertask4",""),
    ;

    private String taskCode;
    private String gatewayCode;

    EveTaskGatewayEnum(String taskCode,String gatewayCode) {
        this.taskCode = taskCode;
        this.gatewayCode = gatewayCode;
    }

    public static String getGatewayCode(String taskCode) {
        for (EveTaskGatewayEnum tgEnum : EveTaskGatewayEnum.values()) {
            if (tgEnum.getTaskCode().equals(taskCode)) {
                return tgEnum.getGatewayCode();
            }
        }
        return null;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public String getGatewayCode() {
        return gatewayCode;
    }
}
